<div class="container">
	<div class="demo-row">
		<div class="alert alert-info" ng-show="error">{{errorMessage}}</div>
		<div class="row">
				<div class="col-lg-8">
					<div class="form-group">
						<div class="input-group">
							<input type="text" class="form-control" placeholder="Search" ng-model="searchAccount">
							<span class="input-group-btn">
								<button type="submit" class="btn"><span class="fui-search"></span></button>
							</span>
						</div>
					</div>
				</div>
			</div>
			
			<hr>
			
			<div class="alert alert-info" ng-show="listAccount.length == 0">
				No Transaction found
			</div>
		
			<table class="table table-hover table-striped table-bordered" ng-show="listAccount.length > 0">
				<thead>
					<tr>
						<th>Id Account</th>
						<th>Name Account</th>
						<th>Account Type</th>
						<th>Status Account</th>
						<th>Balace</th>
						<th>Id Owner Customer</th>
						<th>Action</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="la in listAccount | filter:searchAccount">
						<td>{{la.idaccount}}</td>
						<td>{{la.nameaccount}}</td>
						<td>{{la.idAccountType}}</td>
						<td>{{la.idStatusaccount}}</td>
						<td>{{la.balance}}</td>
						<td>{{la.idCustomer}}</td>
						<td><button class="btn btn-danger" ng-show="la.idStatusaccount == 'block'" ng-click="reportSuccess(la.idaccount)">Report</button>
						<button class="btn btn-success" ng-show="la.idStatusaccount != 'block'" ng-click="viewSuccess(la.idaccount)">View</button></td>
					</tr>
				</tbody>
			</table>
			<button class="btn btn-danger" ng-click="reportAllAccount()">Report All Account</button>
	</div>
</div>

 <script type="text/ng-template" id="account.html">
        <div class="modal-header">
            <h3 class="modal-title">Detail Account</h3>
        </div>
        <div class="modal-body">
            <form class="form-horizontal" role="form" ng-submit="updateAccount(items)">
					  <div class="form-group">
					    <label for="inputLoginId" class="col-sm-3 control-label">Id Account</label>
					    <div class="col-sm-7">
					      <input readonly="true" type="text" class="form-control" ng-model="items.idaccount" value="{{items.idaccount}}">
					    </div>
					  </div>
					  <div class="form-group">
					    <label for="inputLoginId" class="col-sm-3 control-label">Name Account</label>
					    <div class="col-sm-7">
					      <input type="text" class="form-control" ng-model="items.nameaccount" value="{{items.nameaccount}}">
					    </div>
					  </div>
					 <div class="form-group">
					    <label for="inputLoginId" class="col-sm-3 control-label">Type Account</label>
					    <div class="col-sm-7">
					      <input type="text" class="form-control" ng-model="items.idAccountType" value="{{items.idAccountType}}">
					    </div>
					  </div>
						<div class="form-group">
					    <label for="inputLoginId" class="col-sm-3 control-label">Status Account</label>
					    <div class="col-sm-7">
					      <input type="text" class="form-control" ng-model="items.idStatusaccount" value="{{items.idStatusaccount}}">
					    </div>
					  </div>
						<div class="form-group">
					    <label for="inputLoginId" class="col-sm-3 control-label">Balance</label>
					    <div class="col-sm-7">
					      <input type="text" class="form-control" ng-model="items.balance" value="{{items.balance}}">
					    </div>
					  </div>
						<div class="form-group">
					    <label for="inputLoginId" class="col-sm-3 control-label">Owner Customer</label>
					    <div class="col-sm-7">
					      <input type="text" class="form-control" ng-model="items.idCustomer" value="{{items.idCustomer}}">
					    </div>
					  </div>
			</form>
        </div>
        <div class="modal-footer">
            <button class="btn btn-primary" ng-click="updateAccount(items)">OK</button>
            <button class="btn btn-warning" ng-click="cancel()">Cancel</button>
        </div>
 </script>